<template>
  <div>
    <div class="head">预览考试管理</div>
    <div class="background">
      <div class="exam_head">
        <div>
          <span class="exam_name">考试名称：{{ tabledata.name }}</span>
        </div>
        <div>
          <span>考试时长：{{ tabledata.examDuration }}</span>
        </div>
        <div>
          <span>交卷限制：{{ tabledata.submitLimit }}</span>
        </div>
        <div>
          <span>考试类型：{{ tabledata.examType }}</span>
        </div>
        <div>
          <span>考试性质：{{ tabledata.examNature }}</span>
        </div>
        <!-- <div>
        <span>场次数量：{{ tabledata.sessionList.length }}</span>
      </div> -->
      </div>
      <div class="exam_explain">
        <span>考试说明：{{ tabledata.examExplain }}</span>
      </div>
      <div class="exam_address">
        <div
          class="address_list"
          v-for="(item, i) in tabledata.sessionList"
          :key="i"
        >
          <div>
            <span class="title_s">考试场次：</span>
            <span class="value">{{ item.name }}</span>
          </div>
          <div>
            <span class="title_s">考试场地：</span>
            <span>
              <span
                v-for="(item2, i2) in item.addressList"
                :key="i2"
                style="margin-right: 10px"
                >{{ item2.name }}</span
              >
            </span>
          </div>
          <div>
            <span class="title_s">开始时间：</span>
            <span class="value">{{ item.startTime }}</span>
          </div>
          <div style="margin-bottom: 10px">
            <span class="title_s">结束时间：</span>
            <span class="value">{{ item.endTime }}</span>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { listExam, addExam, getExam, delExame } from "@/api/exam/set";
export default {
  name: "ExamVue20211109Show",
  //接收
  props: ["row"],
  data() {
    return {
      tabledata: [],
    };
  },

  mounted() {
    this.getDetail();
  },

  methods: {
    getDetail() {
      getExam(this.row.id).then((response) => {
        this.tabledata = response.data;
      });
    },
  },
};
</script>

<style lang="scss" scoped>
.head {
  padding-bottom: 8px;
  margin-bottom: 30px;
  border-bottom: 1px solid #66cccc;
  font-size: 25px;
  font-family: 1000;
  color: #0099ff;
  // color:#336699;
  font-family: cursive;
  text-shadow: 6px 3px 3px #999999;
}
.background {
  background-color: #f2f6fc;
}
.exam_head {
  background-color: #99cccc;
  display: flex;
  justify-content: space-around; //均匀分布
  flex-wrap: wrap; //自动换行
  font-size: 16px;
  margin: 0;
  padding: 8px 8px;
  color: #ffffff;
}
.exam_name {
  text-align: left;
}
.exam_explain {
  background-color: #ffcc99;
  margin: 30px 45px 20px 45px;
  border-radius: 8px;
  padding: 8px 8px;
  font-size: 16px;
}
.exam_address {
  display: flex;
  justify-content: center;
  padding: 40px;
}
.address_list {
  display: flex;
  flex-direction: column;
  background-color: #ffcccc;
  border-radius: 10px;
  box-shadow: 0px 0px 10px;
  font-size: 16px;
  padding: 15px;
  > div {
    display: flex;
    align-items: center;
    margin-top: 10px;
  }

  .title_s {
    display: block;
    width: 100px;
    text-align: right;
  }
  .value {
    display: block;
  }
}
</style>